package beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CartaBean implements Serializable{
	
	/**
	 * 
	 */
	private Integer Id;
	private static final long serialVersionUID = 1L;
	private List<ItemCartaBean> items = new ArrayList<ItemCartaBean>();
	
	
	

	public List<ItemCartaBean> getItems() {
		return items;
	}

	public void setItems(List<ItemCartaBean> items) {
		this.items = items;
	}

	public void setId(Integer id) {
		Id = id;
	}

	public Integer getId() {
		return Id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((Id == null) ? 0 : Id.hashCode());
		result = prime * result + ((items == null) ? 0 : items.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CartaBean other = (CartaBean) obj;
		if (Id == null) {
			if (other.Id != null)
				return false;
		} else if (!Id.equals(other.Id))
			return false;
		if (items == null) {
			if (other.items != null)
				return false;
		} else if (!items.equals(other.items))
			return false;
		return true;
	}


	
}
